package com.shiwaixiangcun.customer.utils;

/**
 * @author Administrator
 */
public class NoFastClickUtil {
    //上次点击的时间
    private static long lastClickTime = 0;
    //时间间隔
    private static int spaceTime = 2000;

    public static boolean isFastClick() {
//当前系统时间
        long currentTime = System.currentTimeMillis();

        boolean isAllowClick;//是否允许点击

        isAllowClick = currentTime - lastClickTime <= spaceTime;

        lastClickTime = currentTime;

        return isAllowClick;

    }

}